package org.aplikator.server.impl;

import java.util.Locale;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.aplikator.client.rpc.AplikatorService;

public class ContextImpl implements org.aplikator.server.Context {

    private HttpServletRequest httpServletRequest;
    private HttpServletResponse httpServletResponse;
    private AplikatorService aplikatorService;

    public ContextImpl(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, AplikatorService aplikatorService) {
        super();
        this.httpServletRequest = httpServletRequest;
        this.httpServletResponse = httpServletResponse;
        this.aplikatorService = aplikatorService;
    }

    @Override
    public HttpServletRequest getHttpServletRequest() {
        return this.httpServletRequest;
    }

    @Override
    public HttpServletResponse getHttpServletResponse() {
        return this.httpServletResponse;
    }

    @Override
    public Locale getUserLocale() {
        return this.httpServletRequest.getLocale();
    }

    public AplikatorService getAplikatorService() {
        return aplikatorService;
    }

}
